package com.example.smartwaterapi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 经期管理实体类
 */
@Data
@TableName(value = "menstrual_cycle", autoResultMap = true)
public class MenstrualCycle implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 是否启用经期管理
     */
    private Integer isEnabled;

    /**
     * 周期长度(天)
     */
    private Integer cycleLength;

    /**
     * 经期长度(天)
     */
    private Integer periodLength;

    /**
     * 上次经期开始日期
     */
    private LocalDate lastPeriodStart;

    /**
     * 预计下次经期日期
     */
    private LocalDate nextPeriodPredicted;

    /**
     * 当前阶段：menstrual,follicular,ovulation,luteal
     */
    private String currentPhase;

    /**
     * 当前周期第几天
     */
    private Integer currentCycleDay;

    /**
     * 经期建议饮水量(ml)
     */
    private Integer menstrualWaterGoal;

    /**
     * 卵泡期建议饮水量(ml)
     */
    private Integer follicularWaterGoal;

    /**
     * 排卵期建议饮水量(ml)
     */
    private Integer ovulationWaterGoal;

    /**
     * 黄体期建议饮水量(ml)
     */
    private Integer lutealWaterGoal;

    /**
     * 经期提醒开关
     */
    private Integer periodReminderEnabled;

    /**
     * 饮水建议开关
     */
    private Integer waterAdviceEnabled;

    /**
     * 症状历史记录
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private Object symptomsHistory;

    /**
     * 情绪跟踪
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private Object moodTracking;

    /**
     * 创建时间
     */
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    private LocalDateTime updatedAt;
} 